<p>
	<a href="<?php echo $this->url(array('module' => 'default','controller'=>'manage', 'action' => 'subcalendar','gmailAcctId' => $this->gmailAcctId), 'default', true); ?>" class="ui-state-default ui-corner-all linkButton">Back to Sub-Calendar List<span class="ui-icon ui-icon-triangle-1-w"></span></a>
</p>
<?php ?>
<div id="tabs">
	<ul>
		<li><a href="#rawData">Raw Data</a></li>
		<li><a href="#openHours">Next 7 Days Open Hours</a></li>
		<li><a href="#events">Events</a></li>
	</ul>
	<div id="rawData">
		<?php
			if(!empty($this->rawEventData)) {
				foreach ($this->rawEventData as $k => $v) {
					
					echo '<h3>Event #' . $k . '</h3>';
					foreach ($v as $key => $value) {
						if($value != 'closed') {
							echo $key . ' : ' . $value . '<br />';
						}
				    }
				}
			} else {
				echo '<p>There were no events to display. Please check the calendar, and also make sure you have made this calendar public, and there are events saved.</p>';
			}
		?>
	</div>
	<div id="openHours">
		<?php
			if(!empty($this->openHoursArray)) {
				
				foreach ($this->openHoursArray as $oa) {
					echo '<div class="HourInformation"><ul>';
					foreach ($oa as $key => $value) { 
						if($key == 'title') {
							echo '<li class="header">' . $value . '</li>';
						} else {
							echo '<li class="row">' . $key . ' : ' . $value . '</li>';
						}
					}				   
				echo '</ul></div>';
				}
				 
			} else {
				echo '<p>There were no events to display. Please check the calendar, and also make sure you have made this calendar public, and there are events saved.</p>';
			}
		?>
	</div>
	<div id="events">
		
		<?php
			if(!empty($this->rawEventData)) {
				foreach ($this->rawEventData as $k => $data) {
				
		?>
			<div id="individualEvent">
				<h3><?php echo $data['title']; ?></h3>
				<ul>
					<li><strong>Date : </strong><?php echo $data['date']; ?></li>
					<li><strong>Day : </strong><?php echo $data['day']; ?></li>
					<li><strong>Start : </strong><?php echo date("l jS \of F Y @ h:i:s A", $data['start']); ?></li>
					<li><strong>End : </strong><?php echo date("l jS \of F Y @ h:i:s A", $data['end']); ?></li>
					<li><strong>Location : </strong><?php echo $data['location']; ?></li>
				</ul>
			</div>
		<?php 			 
				}
			} else {
				echo '<p>There were no events to display. Please check the calendar, and also make sure you have made this calendar public, and there are events saved.</p>';
			}
		?>
	</div>
</div>

